package com.wyl.mobileplayer.ui.base;

import android.Manifest;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.wyl.mobileplayer.ui.activity.MainActivity;
import com.wyl.mobileplayer.utils.PermissionUtils;


/**
 * 时间：2018/6/24 0024 13:11
 * 描述：
 * 修改人：
 * 修改时间：
 * 修改备注：
 *
 * @author WangYoule
 * @qq 270628297
 */
public abstract class BaseFragment extends Fragment {

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return inflater.inflate(createLayout(), container, false);
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        initView(view);
        initData();
        initListener();
    }

    protected abstract void initView(View view);

    protected abstract int createLayout();

    protected abstract void initListener();

    protected abstract void initData();
}
